package com.fsoft.core.dict.service;

import java.util.List;

import com.fsoft.core.common.QueryParam;
import com.fsoft.core.common.base.service.BaseService;
import com.fsoft.core.dict.entity.SysDictItem;
import com.fsoft.core.utils.tree.Tree;

public interface SysDictItemService extends BaseService<SysDictItem> {
	/***
	 * 根据字典编号或者id标识，配置项编号，获取配置项信息
	 * @author licheng
	 * @date 2021-04-09
	 * @param dictCode
	 * @param itemCode
	 * @return
	 * @throws Exception
	 */
	SysDictItem getEntity(String dictCode, String itemCode) throws Exception;

	/***
	 * 根据字典ID或者字典编号，获取字典明细列表
	 * @author licheng
	 * @date 2021-04-09
	 * @param dictCode
	 * @return
	 * @throws Exception
	 */
	List<SysDictItem> findList(String dictCode) throws Exception;

	List<Tree> findTrees(String dictCode) throws Exception;

	/***
	 * 树形结构配置信息返回
	 * @author licheng
	 * @date 2021-04-09
	 * @param qp
	 * @return
	 * @throws Exception
	 */
	List<Tree> findTrees(QueryParam qp) throws Exception;

	/***
	 * 根据字典ID删除配置项
	 * @author licheng
	 * @date 2021-04-09
	 * @param dictId
	 * @return
	 * @throws Exception
	 */
	int removeByDict(String dictId) throws Exception;

	/***
	 * 根据字典ID删除配置项（批量）
	 * @author licheng
	 * @date 2021-04-09
	 * @param dictId
	 * @return
	 * @throws Exception
	 */
	int removeByDict(List<String> list) throws Exception;
}
